class Test {
    @Obsolete
    print() {
        console.warn('该方法已过期')
        console.log('执行旧方法')

    }
}

function Obsolete(target, methodName, descriptor) {
    // function Test
    // priint
    // {value:function print(){}.}
}

console.log(Test)

const t = new Test()
t.print()

// Test.print()